home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue38 / Dynatab / DYNATAB1.DPR next >
Encoding:
Text File  |  1998-06-01  |  582 b   |  26 lines

  1. {$APPTYPE CONSOLE}
  2. program DynaTab1;
  3. uses
  4.   DB, DBTables;
  5. var
  6.   i: Integer;
  7. begin
  8.   with TTable.Create(nil) do
  9.   try
  10.     DatabaseName := 'DBDEMOS';
  11.     TableName := 'BIOLIFE.DB';
  12.     FieldDefs.Update;
  13.     writeln;
  14.     for i:=0 to Pred(FieldDefs.Count) do
  15.     begin
  16.       write('Field ',i,': ',FieldDefs[i].Name);
  17.       write(' - ',FieldDefs[i].FieldClass.ClassName);
  18.       if FieldDefs[i].DataType = ftString then
  19.         write('[',FieldDefs[i].Size,']');
  20.       if FieldDefs[i].Required then write('*':2);
  21.       writeln
  22.     end
  23.   finally
  24.     Free
  25.   end
  26. end.